package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryQueryPageDto;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    Page<Category> queryPage(CategoryQueryPageDto categoryQueryPageDto);
    @AutoFill(OperationType.INSERT)
    void insert(Category category);

    List<Category> findListByType(String type);
    @AutoFill(OperationType.UPDATE)
    void modifyStatus(Category category);
    @AutoFill(OperationType.UPDATE)
    void updateCategory(Category category);

    Integer findById(Long id);

    void remove(Long id);

    String getById(Long categoryId);

    Category getCategory(Long categoryId);

    List<Category> list();
}
